Chapter 5 - User Events
This is the third of eight chapters that discuss the OpenDoc programming interface in detail. This chapter describes the OpenDoc event-handling mechanism and discusses how your part editor handles user events to activate itself and to manipulate its user interface.It is by handling user events that your part editor interacts with the user and cooperates with the user in constructing the compound documents that contain your parts.
OpenDoc distinguishes user events from semantic events, the messages related to the OpenDoc scripting extension, although user events can be converted into semantic events. Semantic events are discussed in Chapter 9, "Semantic Events and Scripting."
Before reading this chapter, you should be familiar with the concepts presented in Chapter 1, "Introduction to OpenDoc," and Chapter 2, "Development Overview." For additional concepts related to your part editor's runtime environment, see Chapter 11, "OpenDoc Runtime Features." For detailed design recommendations for your parts' user interface, see Part 3 of this book and also Macintosh Human Interface Guidelines.
This chapter starts with a general discussion of user events, and then shows how your part can
- handle mouse events to activate itself
- transfer various types of focus to and from itself
- handle display-related events, for purposes such as hit-testing and scrolling
Chapter Contents
- About Event Handling in OpenDoc
- How User Events Are Handled
- Types of User Events
- Mouse Events
- Mouse Events in Embedded Frames
- Keystroke Events
- Menu Events
- Window Events
- Activate Events
- Update Events
- Null Events
- Other Events
- Propagating Events
- The HandleEvent Method of Your Part Editor
- Mouse Events, Activation, and Dragging
- How Part Activation Happens
- Handling Mouse-Down Events
- Handling Mouse-Up Events
- Handling Activate Events
- Focus Transfer
- Focus Types
- Arbitrating Focus Transfers
- Requesting Foci
- Relinquishing Foci
- Transferring Focus Without Negotiation
- Recording Focus Transfers
- On Frame Activation
- On Window Activation
- On Closing and Reopening Documents
- Display-Related Events
- Hit-Testing
- Invalidating and Updating
- Scrolling
- Event Handling in Scroll Bars Within Your Frame
- Event Handling in Scroll Bars in Separate Frames
- Mouse-Down Tracking and Selection
- Mouse-Up Tracking
- Mouse-Up Feedback While Drawing
- International Text Handling
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help